package util;


import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;


public class UserJwt extends User {
    // 令牌载荷信息存储的内容
    private Long id;    //用户ID
    private String identity;  //用户登录凭证 手机号等

    public UserJwt(String password, Long id, String identity, Collection<? extends GrantedAuthority> authorities) {
        super(id+"",password,authorities);
        this.id = id;
        this.identity = identity;
    }


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getIdentity() {
        return identity;
    }

    public void setIdentity(String identity) {
        this.identity = identity;
    }
}
